{% extends "layouts/base.html" %} {% block title %} Login {% endblock %}

<!-- Specific Page CSS goes HERE  -->
{% block stylesheets %}{% endblock stylesheets %} {% block content %}

<div class="row">
  <div class="col-md-5">
    <div class="card">
      <div class="card-header card-header-primary">
        <h4 class="card-title">登录</h4>
      </div>
      <div class="card-body">
        <h6 class="card-category">
          {% if msg %}
          <span class="text-danger">{{ msg | safe }}</span>
          {% else %}输入账号认证 {% endif %}
        </h6>

        <br />

        <form role="form" method="post" action="">
          {% csrf_token %}

          <div class="row">
            <div class="col-md-12">
              <div class="form-group">
                <label class="bmd-label-floating">用户名</label>
                {{ form.username }}
              </div>
            </div>
          </div>

          <br />

          <div class="row">
            <div class="col-md-12">
              <div class="form-group">
                <label class="bmd-label-floating">密码</label>
                {{ form.password }}
              </div>
            </div>
          </div>

          <br />

          <button type="submit" name="login" class="btn btn-primary pull-left">
            登录
          </button>

          &nbsp; &nbsp;
          <span class="pull-right">
            还没有账号？
            <a href="{% url 'register' %}" class="text-primary">注册</a>
          </span>

          <div class="clearfix"></div>
        </form>
      </div>
    </div>
  </div>
</div>

{% endblock content %}

<!-- Specific Page JS goes HERE  -->
{% block javascripts %}{% endblock javascripts %}
